package bean;

import java.io.Serializable;
import java.util.Map;

import model.Shop;

public class ShopMonthStatisticsMapBean implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Map<Shop, MonthStatisticsListBean> map;
	private Shop[] key = new Shop[1];
	
	public ShopMonthStatisticsMapBean(Map<Shop, MonthStatisticsListBean> m) {
		map = m;
		key = map.keySet().toArray(key);
	}
	
	public Map<Shop, MonthStatisticsListBean> getMap() {
		return map;
	}
	
	public void setMap(Map<Shop, MonthStatisticsListBean> m) {
		map = m;
		key = map.keySet().toArray(key);
	}
	
	public Shop[] getShopList() {
		return key;
	}
	
	public Shop getShop(int index) {
		if (index < key.length) {
			return key[index];
		} else {
			return null;
		}
	}
	
	public MonthStatisticsListBean getStatistics(Shop shop) {
		return map.get(shop);
	}
	
}
